package com.example.common.i18n.util;

import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;

import javax.servlet.http.HttpServletRequest;

public class RequestUtil {

	public static HttpServletRequest getRequest() {
		try {
			ServletRequestAttributes ra = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
			HttpServletRequest request = ra.getRequest();
			return request;
		} catch (Exception e) {
			return null;
		}
	}
}
